import { defineConfig } from 'vite';
import { resolve } from 'path';
import dts from 'vite-plugin-dts';


export default defineConfig({
  build: {
    target: 'node16.0',
    outDir: './packages/core/cli/dist',
    lib: {
      entry: resolve(__dirname, '/packages/core/cli/src/index.ts'),
      // output: '',
      name: 'Tst',
      fileName: (format) => `index.${format}.js`,
      formats: ['cjs', 'umd']
    },
    rollupOptions: {
      external: [],
      output: {
        globals: {}
      }
    }
  },
  plugins: [dts({
    tsconfigPath: './tsconfig.json',
    // rollupTypes: true, 
    // copyDtsFiles: true,
    // outDir: path.resolve(__dirname, 'types')
    // include: ['dist/**'],
  })],
});
